using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._CartographyTools._CartographicRefinement
{
    /// <summary>
    /// <para>Calculate Polygon Main Angle</para>
    /// <para>Calculates the dominant angles of  input polygon features and assigns the values to a specified field in the feature class.</para>
    /// <para>计算输入面要素的主角度，并将值分配给要素类中的指定字段。</para>
    /// </summary>    
    [DisplayName("Calculate Polygon Main Angle")]
    public class CalculatePolygonMainAngle : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CalculatePolygonMainAngle()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input polygon features.</para>
        /// <para>输入面要素。</para>
        /// </param>
        /// <param name="_angle_field">
        /// <para>Angle Field</para>
        /// <para>The field that will be updated with the polygon main angle values.</para>
        /// <para>将使用多边形主角值更新的字段。</para>
        /// </param>
        public CalculatePolygonMainAngle(object _in_features, object _angle_field)
        {
            this._in_features = _in_features;
            this._angle_field = _angle_field;
        }
        public override string ToolboxName => "Cartography Tools";

        public override string ToolName => "Calculate Polygon Main Angle";

        public override string CallName => "cartography.CalculatePolygonMainAngle";

        public override List<string> AcceptEnvironments => ["cartographicCoordinateSystem"];

        public override object[] ParameterInfo => [_in_features, _angle_field, _out_features, _rotation_method.GetGPValue()];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input polygon features.</para>
        /// <para>输入面要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Angle Field</para>
        /// <para>The field that will be updated with the polygon main angle values.</para>
        /// <para>将使用多边形主角值更新的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Angle Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _angle_field { get; set; }


        /// <summary>
        /// <para>Updated Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_features { get; set; }


        /// <summary>
        /// <para>Rotation Method</para>
        /// <para><xdoc>
        ///   <para>Controls the method and origin point of rotation.</para>
        ///   <bulletList>
        ///     <bullet_item>Geographic—Angle is calculated clockwise with 0 at top/north.</bullet_item><para/>
        ///     <bullet_item>Arithmetic—Angle is calculated counterclockwise with 0 at the right/east.</bullet_item><para/>
        ///     <bullet_item>Graphic—Angle is calculated counterclockwise with 0 at top/north. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>控制旋转的方法和原点。</para>
        ///   <bulletList>
        ///     <bullet_item>地理 - 角度按顺时针方向计算，顶部/北方向为 0。</bullet_item><para/>
        ///     <bullet_item>算术 - 角度按逆时针方向计算，右/东为 0。</bullet_item><para/>
        ///     <bullet_item>图形 - 按逆时针方向计算角度，顶部/北方向为 0。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Rotation Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _rotation_method_value _rotation_method { get; set; } = _rotation_method_value._GRAPHIC;

        public enum _rotation_method_value
        {
            /// <summary>
            /// <para>Geographic</para>
            /// <para>Geographic—Angle is calculated clockwise with 0 at top/north.</para>
            /// <para>地理 - 角度按顺时针方向计算，顶部/北方向为 0。</para>
            /// </summary>
            [Description("Geographic")]
            [GPEnumValue("GEOGRAPHIC")]
            _GEOGRAPHIC,

            /// <summary>
            /// <para>Arithmetic</para>
            /// <para>Arithmetic—Angle is calculated counterclockwise with 0 at the right/east.</para>
            /// <para>算术 - 角度按逆时针方向计算，右/东为 0。</para>
            /// </summary>
            [Description("Arithmetic")]
            [GPEnumValue("ARITHMETIC")]
            _ARITHMETIC,

            /// <summary>
            /// <para>Graphic</para>
            /// <para>Graphic—Angle is calculated counterclockwise with 0 at top/north. This is the default.</para>
            /// <para>图形 - 按逆时针方向计算角度，顶部/北方向为 0。这是默认设置。</para>
            /// </summary>
            [Description("Graphic")]
            [GPEnumValue("GRAPHIC")]
            _GRAPHIC,

        }

        public CalculatePolygonMainAngle SetEnv(object cartographicCoordinateSystem = null)
        {
            base.SetEnv(cartographicCoordinateSystem: cartographicCoordinateSystem);
            return this;
        }

    }

}